/**********************************************************************************/
/* This class is used to define the top wall and bottom wall, as well         ****/
/* as their normal vector and the function to calculate the distance of a point **/
/* to a line for particle impingement                                           */
/********************************************************************************/
#pragma once

#include "CaseSettings.h"

using namespace std;

class WallGeometry
{
public:
	WallGeometry() {
		K_bot = 0.0, b_bot = 0.0, K_top = 0.0, b_top = 0.0;
		normal_bot = vector<double>(3, 0.0);
		normal_top = vector<double>(3, 0.0);
	}
	WallGeometry(const shared_ptr<CaseSettings> caseSetting1);

	double getBotY(double x0);// function to get Y coordinate of bottom wall
	double getTopY(double x0);// function to get Y coordinate of Top wall

	double K_bot, b_bot;//Bottom Wall, represented by linear line
	double K_top, b_top;//Top Wall, represented by linear line

	vector<double> normal_bot, normal_top;// Normal vector of a wall face
};

// Function to find the distance of a point to a line
double CalWallDist(const vector<double>& p0, const vector<double>& lineLeft, const vector<double>& lineRight);

// Function to find the normal vector of a line
vector<double> GetFaceNorm(vector<double> face_N1, vector<double> face_N2, vector<double> tempCell);